<?php
namespace app\admin\controller;
use think\Controller;
use think\facade\Db;
use think\facade\Session;
use think\facade\View;

use app\common\model\Region as RegionModel;

class Region extends Base
{

    public function getRegionList(){
        $param = input('param.');
        $RegionModel = new RegionModel();
        $parent_id = isset($param['parent_id'])?$param['parent_id']:0;
        $level = isset($param['level'])?$param['level']:1;
        $res = $RegionModel
            ->where("parent_id","=",$parent_id)
            ->where("level",'=',$level)
            ->select();
        return dyajaxReturn(1,'获取成功',$res);
    }

}
